-- Prefan Access Controller
-- Plugin Man

-- Variables

PAC.Plugins = {}
PAC.Hooks = {}
PAC.ConCommands = {}

-- Functions

function PAC.AddPlugin( name, disc, author )

	PAC.Print( PAC_CONSOLE, "Plugins --> Loading " .. name .. " by " .. author .. "!" )
	
end

function PAC.LoadPlugins()

	local location = "pac/plugins/" 
	local plugins = file.FindInLua( location .. "*.lua" )
	
	for k,v in pairs( plugins ) do
	
		include( location .. v )
		AddCSLuaFile( location .. v )
		
	end
	
end

function PAC.AddHook( h, hname, func )

	PAC.Hooks[h] = func
	
	hook.Add( h, hname, func )
	
	PAC.Print( PAC_CONSOLE_DEBUG, "Adding Hook " .. h )
	
end

function PAC.ConCommand( command, func )

	PAC.ConCommands[command] = func
	
	concommand.Add( command, func )
	
	PAC.Print( PAC_CONSOLE_DEBUG, "Adding Command " .. command )
	
end
